using System;
using System.Runtime.Serialization;
using System.Collections.Generic;
using System.ComponentModel;
using PSE.Framework.Common.Validation;

namespace PSE.Framework.Common.Exceptions.FaultContracts
{
    /// <summary>
    /// Validation Fault returned by the WCF Services when occurs any validation exception.
    /// </summary>
    [DataContract(Namespace = "http://www.bvmf.com.br/PSE.Framework.Common.Exceptions.FaultContracts", Name = "ValidationFault")]
    public class ValidationFault 
    { 

        #region Fields

        private List<ValidationError> _validationErrors;

        #endregion

        #region Constructors

        /// <summary>
        /// Default Constructor
        /// </summary>
        public ValidationFault()
        {
        }

        #endregion

        #region Public Members

        /// <summary>
        /// Error Message. Defined as a DataMember.
        /// </summary>
        [DataMember(IsRequired = true, Name = "ValidationErrors", Order = 1)]
        public List<ValidationError> ValidationErrors
        {
            get { return _validationErrors; }
            set { _validationErrors = value; }
        }

        #endregion
    }
}
